package com.javatest.springboot3minio.dao;

import com.javatest.springboot3minio.entity.AttachmentInfo;
import java.util.List;

/**
 * Created with IntelliJ IDEA. Description:
 *
 * @author liuzi
 * @since 2024/1/11 20:28
 */
public interface AttachmentManageDao {
  int countAttachment(AttachmentInfo attachment);

  /**
   * Gets attachment list.
   *
   * @param projectId the project id
   * @param attachmentType the attachment type
   * @return the attachment list
   */
  List<AttachmentInfo> getAttachmentList(String projectId, String attachmentType);

  /**
   * 保存附件
   *
   * @param attachment 附件
   * @return 附件id
   */
  int addNewAttachment(AttachmentInfo attachment);

  /**
   * 删除附件
   *
   * @param id
   * @return
   */
  int delAttachment(int id);
}
